from .c import CBuilder
from ..core import Builder, ResourceBuilder, ChainBuilder


class PyrexBuilder(Builder):
    """compiles pyrex files (*.pyx) to c code"""
    @classmethod
    def scan(cls, node):
        pass
    
    @classmethod
    def get_output_name(cls, node):
        return node.relname + ".c"
    
    @classmethod
    def build(cls, node):
        pass

PyrexResourceBuilder = ChainBuilder(CBuilder, ResourceBuilder("pyx"))


def register_builder():
    PyrexBuilder.register("pyx")
    PyrexResourceBuilder.register("pyx.c")




